{layout name="layouts/admin" /}
<div class="panel-heading">赞助商列表
   <a style="float:right;margin-top:-6px;" href="/sponsor/add" class="btn btn-primary">添加赞助商</a>
</div>

<div class="panel-body">
    <div class="box-body">
        <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
            <div class="row">
                <div class="col-sm-12">
                    <table class="table table-hover dataTable" >
                        <thead>
                        <tr>
                            <th>赞助商ID</th>
                            <th>赞助商名称</th>
                            <th>审核状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach $sponsors as $sp}
                        <tr>
                            <td>{$sp.id}</td>
                            <td>{$sp.sp_name}</td>
                            <td>{$sp.audit_status==0?'待审核':($sp.audit_status==1?'已通过':'审核失败')}</td>
                            <td>
                                <a href="/sponsor/add/{$sp.id}"><i class="fa fa-pencil fa-fw" style="font-size: 20px;" title="编辑"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                {if $sp.audit_status==0}
                                <a href="/sponsor/audit/{$sp.id}/1" onclick="return confirm('确定要通过审核么？请慎重操作!!!')"><i class="fa fa-check" style="font-size: 20px;" title="通过"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <a href="/sponsor/audit/{$sp.id}/2" onclick="return confirm('确定不通过此审核？请慎重操作!!!')"><i class="fa fa-close" style="font-size: 20px;" title="不通过"></i></a>
                                {/if}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="row">
                <div class="col-md-9 ">
                    {$sponsors?"":"暂无数据"}
                </div>

            </div>
        </div>
    </div>

</div>